package com.exam.vo.examEnum;
//返回结果的枚举类型
public enum ResultCode {

    SUCCESS(200, "成功"), INTERNAL_ERROR(500, "服务器异常"), NOT_FOUND(404, "找不到的请求"), UNAUTHORIZED(401, "未授权的请求"), BAD_REQUEST(400, "无效请求");

    private int code;
    private String msg;

    private ResultCode(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public int getCode() {
        return this.code;
    }

    public String getMsg() {
        return this.msg;
    }

    @Override
    public String toString() {
        return String.valueOf(this.code);
    }
}